Skip to main content

PUT Order

When an order is created in the LetsGetChecked system, it is immediately set for dispatch by our team. In most cases, an order is dispatched within one business day of order creation.

Order operations are created to manage the client/customer purchases with LetsGetChecked. The operation is idempotent. If the response of the operation is not obtained, for example if the connection breaks, the client application can retry. If the previous invocation never arrived it runs for the first time, and if it runs, the previous result is returned.

Request

Endpoint

PUT {clientId}/api/v2/orders/{clientOrderId}

Create a unique order for a specific client.

Headers

The PUT Order API requires the following information in the headers of an HTTP request:

HTTP HeaderDescription
AuthorizationThe HTTP Authorization request header contains the credentials to authenticate a user agent with a server.
AcceptThe HTTP Accept request header contains information about the content types, expressed as MIME types, that the client can understand. The MIME type for the PUT Order API request is application/json.
Content-TypeThe Content-Type request header defines the type of data that the client sends to the server. For the PUT Order API request, the type of data is application/json.

Path parameters

ParameterDescriptionTypeRequired/Optional
clientIdThe clientId is a unique code that LetsGetChecked provides. The clientId is used to identify a client, when a client calls the Orders and Results APIs. The code is formed by 1 to 4 alphanumeric characters. The clientId displays in the HL7 results as PV1.3.1.stringRequired
clientOrderIdThe clientOrderId is a unique ID, per order, in the client's system. The maximum length is 100 characters. When a client application uses the Order API, a clientOrderId value is generated by the client that is the reference for the order in the LetsGetChecked system. The Client Order ID displays in the HL7 results as an AOE OBX segment.stringRequired

Sample request

{
"address":{
"addressLine1":"Line1",
"addressLine2":"Line2",
"city":"Boston",
"countryIsoAlpha2":"US",
"postalCode":"55555",
"state":"MA"
},
"patientInfo": {
"participantId":"11111",
"firstName":"fName",
"middleName":"mName",
"lastName":"lName",
"email":"test@email.com",
"phoneNumber":{
"phoneCountryCode":"+1",
"phoneNumber":"555588888"
},
"gender": "Male",
"dob": "1901-12-06",
"ethnicity": "Hispanic",
"race": "AfricanAmerican",
"participantLanguage": "SPANISH",
"healthPlanName": "PayerPlanName"
},
"programCode": "Health4All",
"orderItems": [
{
"code":"GLCS",
"quantity":1
},
{
"code":"FCIT",
"quantity":1
}
],
"physicianInfo":{
"firstName":"PhysicianFirstName",
"middleName":"MiddleName",
"lastName":"PhysicianLastName",
"npi":1000000001
},
"primaryCareProvider":{
"id":"PCP1234567",
"firstName":"test",
"middleName":"middle",
"lastName":"last",
"address":{
"addressLine1":"330 W 38th Street",
"addressLine2":"405",
"city":"New York",
"countryIsoAlpha2":"US",
"postalCode":"10018"
},
"phone":"965878945",
"phone2":"123456789",
"fax":"8181818181",
"vendorName":"vendorName"
},
"insurance": {
"insurancePlan": {
"policyNumber":"12345",
"planName":"InsurancePlanName",
"hierarchy":"Primary",
"groupName":"InsuranceGroupName",
"groupNumber": "GH123"
}
},
"note":"Order Note",
"diagnosisCodes":[
"D01",
"D02"
],
"customData":[
{
"key":"SubscriberID",
"value":"12345678"
},
{
"key":"key2",
"value":"value2"
},
{
"key":"key3",
"value":"value3"
}
]
}

Request definitions

The following table describes each item in the body of the request:

ElementDescriptionTypeRequired/Optional
patientInfoInformation about the patient.object(PatientModel)Required
patientInfo /participantIdThe Participant ID must be unique and associated with a person in your system of record. It can be an employee ID or Customer ID. Do not reuse or recycle Participant IDs.stringRequired
patientInfo /firstNameThe patient’s first name.stringRequired
patientInfo /middleNameThe patient’s middle name.stringOptional
patientInfo /lastNameThe patient’s last name.stringRequired
patientInfo /emailThe patient’s email address.stringOptional
patientInfo /phoneNumberThe patient’s phone number.object(PhoneNumberModel)Required
patientInfo/phoneNumber /phoneCountryCodeThe country code of the user’s phone number. Format: The value should start with a "+" followed by one to four numeric digits.stringRequired
patientInfo/phoneNumber /phoneNumberThe remaining digits of the user’s phone number, after the country code.stringRequired
patientInfo /genderThe patient’s gender. The following case agnostic values are allowed:
  • MALE, Male, male
  • FEMALE, Female, female
stringRequired
patientInfo /dobThe patient’s date of birth. The format is YYYY-MM-DD.stringRequired
patientInfo /ethnicityThe patient’s ethnicity. The following values are allowed:
  • NoEthnicityProvided
  • Hispanic
  • NotHispanic
stringRequired
patientInfo /raceThe patient’s race. The following values are allowed: UnknownRace, AmericanIndian, NativeAlaskan, Asian, AfricanAmerican, African, Hispanic, Latino, PacificIslander, NativeHawaiian, Caucasian, AshkenaziOrSephardiJewish, OtherRacestringRequired
patientInfo /participantLanguageThe patient’s language. The following case agnostic values are allowed:
  • ENGLISH, English, english
  • SPANISH, Spanish, spanish
stringOptional
patientInfo /healthPlanNameThe sub-plan name for the current payer.stringOptional
addressThe user’s address based on the address in the request.object(AddressModel)Required
address /addressLine1The first line of the user’s address. This can have a maximum length of 35 characters.stringRequired
address /addressLine2The second line of the user’s address. This can have a maximum length of 35 characters.stringOptional
address /cityThe user’s city.stringRequired
address /countryIsoAlpha2The user’s country. Must be the ISO-3166 standard compliant. Allowed value: USstringOptional
address /postalCodeThe user’s postal code or zip code.stringRequired
address /stateThe user’s state. Allowed values: AK, AL, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WYstringOptional
diagnosisCodesThe diagnosis code. It displays in the HL7 results as one DG1 segment per code.Array of stringOptional
programCodeThe code associated with the program, that is provided by LetsGetChecked.stringRequired
orderItemsOrder Items associated with an order.object(CreateOrderItemModel)Required
orderItems /codeThe test kit code for Order Items, provided by LetsGetChecked.stringRequired
orderItems /quantityThe quantity of Order Items.integerRequired
physicianInfoThe physician information. You can use this object to submit physician information for a physician that does not order from LetsGetChecked. Note: The physicianInfo information is mandatory when the physician is not a LetsGetChecked physician.object(PhysicianInfo)Optional
physicianInfo /firstNameThe first name of the physician.stringRequired
physicianInfo /middleNameThe middle name of the physician.stringOptional
physicianInfo /lastNameThe last name of the physician.stringRequired
physicianInfo /npiThe National Provider Identifier (NPI) for the physician (USA).integerRequired
primaryCareProviderThe patient Primary Care Provider (PCP) information.object(PrimaryCareProviderModel)Optional
primaryCareProvider /idThe PCP unique identicator
  • Empty is allowed (indicates that there is no provider for the patient)
  • Alphanumeric is allowed
  • Maximum length of 15 characters
stringRequired
primaryCareProvider /firstNameThe PCP's first name. Tip: Together, the first, middle, and last names combined should have less than 100 characters.stringRequired
primaryCareProvider /middleNameThe PCP's middle name. Tip: Together, the first, middle, and last names combined should have less than 100 characters.stringOptional
primaryCareProvider /lastNameThe PCP's last name. Tip: Together, the first, middle, and last names combined should have less than 100 characters.stringRequired
primaryCareProvider /phoneThe PCP's phone number.stringOptional
primaryCareProvider /phone2The PCP's secondary phone number.stringOptional
primaryCareProvider /faxThe PCP's fax number.stringOptional
primaryCareProvider /vendorNameThe PCP vendor provider name.stringOptional
primaryCareProvider /addressThe PCP's address.object(AddressModel)Required
insuranceA patient’s Insurance information.object(InsuranceModel)Optional
insurance /insurancePlanInformation associated with a patient’s Insurance Plan.object(InsurancePlanModel)Optional
insurance/insurancePlan /policyNumberThis is required to be a Policy Number associated with a patient’s Insurance Plan. Accepts up to 30 characters.stringRequired
insurance/insurancePlan /planNameA patient’s Insurance Plan Name.stringRequired
insurance/insurancePlan /hierarchyThe hierarchy of a Plan Type associated with a patient’s Insurance Plan. Possible values: Unknown, Primary, Secondary, Tertiary.stringOptional
insurance/insurancePlan /groupNameThe Group Name associated with a Patient’s Insurance Plan.stringOptional
insurance/insurancePlan /groupNumberThe group name associated with the patient insurance.stringOptional
customDataContains any additional custom data that is associated with an order and it is available for reporting purposes.
  • Custom data must be in the format of key-value pairs.
  • Alphanumeric characters are allowed.
  • Maximum length of 50 characters.
  • Key and value cannot be null.
Use cases for customData
  • Sending appointment times so that LetsGetChecked can ship orders based on appointment dates.
  • Adding extra information to an order such as a patient's location or the name of the clinic they visit. Customers can then use filters on reports for the order, for example, to categorize a patient by city or clinic.
List of key-value pairsOptional
noteContains any additional notes or information.stringOptional

Response

The sample response is a single JSON object that contains the following fields:

PropertyDescriptionType
clientOrderIdThe clientOrderId is a unique ID, per order, in the client's system. The maximum length is 100 characters. When a client application uses the Order API, a clientOrderId value is generated by the client that is the reference for the order in the LetsGetChecked system.string
participantIdThe participantId must be unique and associated with someone in your system of record. It can be an employee ID or Customer ID. Do not reuse or recycle participant IDs.string
orderItemsOrder Items associated with an order.object(CreateOrderItemModel)
orderItems /codeThis is a unique identifier for each type of test kit provided by LetsGetChecked.string
orderItems /idThe unique order item identifier in the LetsGetChecked system.string

Status Codes

Status CodeDescription
202Accepted. New Order placed for Creation
400Bad Request
401Unauthorized
404NotFound
409Conflict. Order cannot be modified after successful submission
415Unsupported media type. Payload in a unsupported format
500Server Error
503Server Error

Sample Responses

200

{
"clientOrderId":"1234567",
"participantId":"11111",
"orderItems": [
{
"code": "Code1",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}